package com.zy.factorymethod2;

import com.zy.bean.ICourse;

/**
 * @program: cloud147
 * @description:
 * @author: zy
 * @create: 2025-07-16 14:49
 */
public class Test {
    public static void main(String[] args) {
        // 2. 开闭原则

        // 2. 开闭原则

        //课程 工厂
        ICourseFactory factory = new PythonCourseFactory();
        ICourse course = factory.create();
        course.record();

        factory=new JavaCourseFactory();
        course=factory.create();
        course.record();

        factory=new CCourseFactory();
        course=factory.create();
        course.record();


    }
}
